interface IUser {
  buy: () => void;
}

class OrdinaryUser implements IUser {
  buy() {
    console.log("普通用户购买");
  }
}

class MemberUser implements IUser {
  buy() {
    console.log("会员购买");
  }
}

class VipUser implements IUser {
  buy() {
    console.log("VIP 用户购买");
  }
}

const u1 = new OrdinaryUser();
const u2 = new MemberUser();
const u3 = new VipUser();
u1.buy();
u2.buy();
u3.buy();
